<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/5/19
  Time: 14:03
  To change this template use File | Settings | File Templates.
--%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8" />
    <title>申请列表</title>
    <meta name="description" content="app, web app, responsive, admin dashboard, admin, flat, flat ui, ui kit, off screen nav" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/js/jPlayer/jplayer.flat.css" type="text/css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.css" type="text/css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/animate.css" type="text/css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/font-awesome.min.css" type="text/css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/simple-line-icons.css" type="text/css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/font.css" type="text/css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/app.css" type="text/css" />

    <link rel="stylesheet" href="${pageContext.request.contextPath}/js/datepicker/datepicker.css" type="text/css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/js/slider/slider.css" type="text/css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/js/chosen/chosen.css" type="text/css" />
    <!--[if lt IE 9]>
    <script src="${pageContext.request.contextPath}/js/ie/html5shiv.js"></script>
    <script src="${pageContext.request.contextPath}/js/ie/respond.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/ie/excanvas.js"></script>
    <![endif]-->
    <style>
        .myImg{
            width: 55px;
            height: 55px;
        }
    </style>
</head>
<body>
    <section class="vbox">
        <section class="scrollable wrapper">
            <h2 class="font-thin m-b">申请列表</h2><!-- 从上到下依次为评分最高者 点赞数最多者 各显示前20名次 movie‘s name 为链接 可连接到对应作品详情页-->
            <div class="col-sm-12">
                <section class="panel panel-default">

                    <table class="table table-striped m-b-none">

                        <tr>
                            <th>序号</th>
                            <th></th>
                            <th>申请人</th>
                            <th>申请事项</th>
                            <th>申请时间</th>
                            <th></th>
                        </tr>

                        <tbody>
                        <c:forEach var="apply" items="${applyList}" varStatus="status">
                            <tr >
                                    <td>&nbsp;&nbsp;${status.count}</td>
                                    <td>
                                        <c:choose>
                                            <c:when test="${apply.imgUrl!=null}">
                                                <img src="<%=(basePath)%>${apply.imgUrl}" class="myImg" alt="没有上传头像">
                                            </c:when>
                                            <c:otherwise>
                                                <img src="${pageContext.request.contextPath}/images/user.png" class="myImg" alt="没有上传头像">
                                            </c:otherwise>
                                        </c:choose>
                                    </td>
                                    <td>${apply.applyName}</td>
                                    <td>
                                        <c:choose>
                                            <c:when test="${apply.role==0}">
                                                <span>申请身份为学生</span>
                                            </c:when>
                                            <c:otherwise>
                                                <span>申请身份为教师</span>
                                            </c:otherwise>
                                        </c:choose>
                                    </td>
                                    <td>
                                        <fmt:formatDate  value="${apply.createTime}" pattern="yyyy-MM-dd hh:mm:ss" type="date" dateStyle="long" />
                                    </td>
                                    <td>
                                        <a href="<%=(basePath)%>apply/getDetail?applyId=${apply.id}">
                                            <div style="height: 100%;width: 10%;font-size: 23px;">
                                            <i class="fa fa-share-square-o" aria-hidden="true" style="margin-top: 10px;"></i>
                                            </div>

                                        </a>
                                    </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </section>
            </div>

        </section>
    </section>

    <script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
    <!-- Bootstrap -->
    <script src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
    <!-- App -->
    <script src="${pageContext.request.contextPath}/js/app.js"></script>

    <!-- datepicker -->
    <script src="${pageContext.request.contextPath}/js/datepicker/bootstrap-datepicker.js"></script>
    <!-- slider -->
    <script src="${pageContext.request.contextPath}/js/slider/bootstrap-slider.js"></script>
    <!-- file input -->
    <script src="${pageContext.request.contextPath}/js/file-input/bootstrap-filestyle.min.js"></script>
    <!-- wysiwyg -->
    <script src="${pageContext.request.contextPath}/js/wysiwyg/jquery.hotkeys.js"></script>
    <script src="${pageContext.request.contextPath}/js/wysiwyg/bootstrap-wysiwyg.js"></script>
    <script src="${pageContext.request.contextPath}/js/wysiwyg/demo.js"></script>
    <!-- markdown -->
    <script src="${pageContext.request.contextPath}/js/markdown/epiceditor.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/markdown/demo.js"></script>

    <script src="${pageContext.request.contextPath}/js/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/app.plugin.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jPlayer/jquery.jplayer.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jPlayer/add-on/jplayer.playlist.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jPlayer/demo.js"></script>
</body>
</html>
